package desgin.pattern.behavior.command.sample;


/**
 * 
 * @Type Client
 * @Desc test
 * @author shuai.zuo
 * @date 2015年3月9日
 * @Version V1.0
 */
public class Client {

    public static void main(String[] args) {
        Tv tv = new Tv();
        Operation o = null;
        TvControl con = null;
        // turn on
        o = new OperationTurnOn(tv);
        con = new TvControl(o);
        con.run();

        // turn off
        o = new OperationTurnOff(tv);
        con = new TvControl(o);
        con.run();

        // channge channel
        o = new OperationChangeChannel(tv, "cctv-1");
        con = new TvControl(o);
        con.run();
    }
}
